import axios from 'axios';
import type { HttpResponse } from './interceptor';

export interface CompanyMasterRecord {
  id: number;
  company_id: number;
  user_id: number;
  created_at: string;
  updated_at: string;
}

export function queryCompanyMasterList(company_id: number): Promise<HttpResponse<CompanyMasterRecord[]>> {
  return axios.get('/admin/company-master/list', { params: { company_id } });
}

export function addCompanyMaster(data:any): Promise<HttpResponse<null>> {
  return axios.post('/admin/company-master/add', data);
}

export function deleteCompanyMaster(id: number): Promise<HttpResponse<null>> {
  return axios.post('/admin/company-master/delete', {id});
} 